package com.hawk.eye.framework.config.properties;


import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;

import java.io.File;

/**
 * @className: HawkEyeServerProperties
 * @description:
 * @author: salad
 * @date: 2022/10/23
 **/
@Data
@ConfigurationProperties(prefix = HawkEyeServerProperties.PREFIX)
public class HawkEyeServerProperties {

    public final static String PREFIX = "hawk-eye.server";

    private String storageType = "MYSQL";

    private CacheType cacheType = CacheType.REDIS;

    private Boolean enabledRepairWorkOrder = Boolean.TRUE;

    private Boolean initTables = Boolean.TRUE;

    private String pluginWebhookPath =  new File(System.getProperty("user.dir")).getParent() + File.separator + "plugins/webhook";

    private String pluginStoragePath = new File(System.getProperty("user.dir")).getParent() + File.separator + "plugins/storage";

    public enum CacheType {
        LOCAL,
        REDIS
    }

}
